<div id="footer_outer">
    <div id="footer_wrapper">
        <div id="footer_links">
            <div class="info">
                <h2 class="latestPictuers"></h2>
                <div id="fb-root"></div>
                <script>
                    (function(d, s, id) {
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id)) return;
                    js = d.createElement(s); js.id = id;
                    js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
                    fjs.parentNode.insertBefore(js, fjs);
                }(document, 'script', 'facebook-jssdk'));
                </script>
                <div class="fb-comments" data-href="http://localhost/banhang/" data-width="470" data-num-posts="2"></div>
            </div><!--end info-->
            <div class="info">
                <h2 class="upcomingEvents"></h2>
            </div><!--end info-->
        </div><!--end footer_links-->
        <div id="footer">
            <p>
                @copyright by nguyen.ars | Powered by<a href="http://codeigniter.com" target="_blank">Codeigniter</a>
            </p>
        </div><!--end footer-->
    </div>
    <!--end footer_wrapper -->
</div><!--end footer_outer -->
<script type="text/javascript">
    var base_url = "<?php echo base_url();?>";
</script>
<script type="text/javascript">
    //login
    $(function(){$("form[name='login']").submit(
            function(){
                var _username=$("#username").val();
                var _pass=$("#password").val();
                if(_username=='' || _username == 'Username'){
                    alert("Bạn chưa điền tên đăng nhập");
                    return false;
                }
                if(_pass=='' || _pass == 'Password'){
                    alert("Bạn chưa điền mật khẩu");
                    return false;
                }
                $.ajax({
                    url:base_url+"user/login",
                    type:"POST",
                    data:{username:_username,pass:_pass},
                    beforeSend:function(xhr){
                        $("#button_login").attr('src',base_url+'public/temp/img/icon/ajax-loader.gif');
                    },
                    timeout:10000,
                    error:function(xhr,status){
                        switch(status){
                            case"timeout":$("#button_login").attr('src',base_url+'public/temp/img/icon/ajax-loader.gif');
                                break;
                            default:$("#button_login").attr('src',base_url+'public/temp/img/icon/ajax-loader.gif');
                                break;
                        }
                    },
                    success:function(response,status){
                       location.href = '<?php echo base_url();?>'
                    }
                });
                return false;
            });
    })
</script>
</body>
</html>